package com.gong.DesignPattern.factoryPattern.simpleFactory;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/6/8 0008 8:57
 */
public class PhoneFactory {

    public Phone create(String phone){
        if ("xiaomi".equals(phone)){
            return new Xiaomi();
        }else if ("iphone".equals(phone)){
            return new Iphone();
        }

        return null;
    }
}
